function x = PL_inverse_bayer_filter(X, indices, size_x)
% x = PL_inverse_bayer_filter(X, indices, size_x)
% 
% PL_inverse_bayer_filter performs the inverse Bayer filter on an RGB image 
% of size [M N 3]. This filter is the adjoint to the PL_bayer_filter and
% is used for demosaicking. To perform demosaicking see either  
% PL_demosaicking or PL_test_demosaicking.
%
% See also: PL_inverse_bayer_filter, PL_demosaicking, PL_test_demosaicking
%
% [1] M.J. Ehrhardt and S. Arridge, 
%     Vector-Valued Image Processing by Parallel Level Sets, 
%     IEEE Transactions on Image Processing (to appear), 2013
%
% 2013-07-25 --------------------------------------------------------------
% 
% Matthias J. Ehrhardt
% CMIC, University College London, UK
% 
% matthias.ehrhardt.11@ucl.ac.uk
% 
% -------------------------------------------------------------------------

    x = zeros(size_x);
    
    x(indices) = X;
end